import React from 'react';
import axios from 'axios'
const App:React.FC=()=> {
  const data:any={
    id:"123123123",
    price:"100",
    title:"商品"
  }
  const zf=()=>{
     
    axios.get('/api/pay',{params:{data}}).then((resp):any=>{
      console.log(resp.data.data)
      window.location.href=resp.data.data
    })
  }
  return (
    <div>
       <button onClick={()=>zf()}>去支付</button>
    </div>
  );
}

export default App;
